keywords: ip pbx voip gateway gsm gateway

×

Notice

The forum is in read only mode.
× Questions about G400/G410 Cards.

How to obtain and handle GSM_EVENT_SM_RECEIVED in dialplan

12 years 10 months ago #6975 by Joe.Yung
Hi, We've developed another newer driver named chan-extra for G400P, you will be able to store, send and receive SMS. There is a hint on the asterisk CLI when you receive a short message. So is it possible to switch to this driver from bristuff?

Please read here for more.

i] Last edited by Joe.Yung at 2011-6-14 11:55 [/i

12 years 10 months ago #6977 by bluemonster

Original posted by Joe.Yung at 2011-6-14 11:49

Hi, We've developed another newer driver named chan-extra for G400P, you will be able to store, send and receive SMS. There is a hint on the asterisk CLI when you receive a short message. So is it po ...

Thank you for your quick response.But I think it's impractical to keep watching the asterisk CLI and waiting for the SMS incoming.I want to obtain and handle the SMS event automatically.

Is there any programing method like dialplan to achieve my goal if I switch to chan-extra? When asterisk receives a short message, except the hint on asterisk CLI,is there any other way to get informed of this event? I have a little knowledge of AGI and AMI,can this two interfaces help?

i] Last edited by bluemonster at 2011-6-14 15:11 [/i

A student from Huazhong University of Science and Technology
12 years 10 months ago #6979 by Joe.Yung
Hi,
Our driver chan_extra owns "GSM_EVENT_SMS_RECEIVED" case in chan_extra.c . Unfortunately, we don't have this kind of material of how to make it worked , but I've googled and got that there is a possible method like this:AIM event triggering an incoming SMS message. Here its link: http://forum.pikatechnologies.com/showthread.php?547-Send-and-Receive-SMS

I hope this would help you.

12 years 10 months ago #6980 by bluemonster

Original posted by Joe.Yung at 2011-6-14 18:04

Hi,Our driver chan_extra owns "GSM_EVENT_SMS_RECEIVED" case in chan_extra.c . Unfortunately, we don't have this kind of material of how to make it worked , but I've googled and got that there is a p ...

You are very kind and patient,thank you!I have viewed the web page,it seems that they are using a channel driver named chan_gsm,and I can't find it in opvx-bristuff-0.4.0-RC3h. So I can't use the commands like "[font=Verdana, Arial, Tahoma, Calibri, Geneva, sans-serif]gsm show sms [/font]" and "[font=Verdana, Arial, Tahoma, Calibri, Geneva, sans-serif]gsm fetch sms [/font]".Furthermore,the methods introduced in the web page all ends with manually fetching SMS by CLI command [font=Verdana, Arial, Tahoma, Calibri, Geneva, sans-serif] 'gsm fetch sms' [/font].

I have tried to modify chan_dahdi.c to add some code under case GSM-EVENT_SM_RECEIVED,then I run opvx-bristuff-0.4.0-RC3h/compile.sh. After it completed,the modified chan_dahdi.c was covered , and it turned to be the original one.I think it must be coverd during the compile procedure,but I have poor knowledge of makefile , would you please tell me how can I modify chan_dahdi.c and re-compile opvx-bristuff-0.4.0-RC3h to add the functions I need?


i] Last edited by bluemonster at 2011-6-15 10:20 [/i

A student from Huazhong University of Science and Technology
12 years 10 months ago #6988 by bluemonster
I just tried to switch to chan_extra
Because I have already installed and run opvx-bristuff-0.4.0-RC3h,so I first stop asterisk gracefully from asterisk CLI ,then 'rmmod opvxg4xx' and 'rmmod zaptel'.
For the purpose of insurance, I enter /usr/src/opvx-bristuff-0.4.0-RC3h/asterisk-1.4.26.2 and run 'make uninstall' to remove asterisk-1.4.26.2
enter /usr/src/opvx-bristuff-0.4.0-RC3h/zaptel and run 'make uninstall-modules' to remove zaptel
After that, I successfully install chan_extra-1.1.0 by running /usr/src/chan_extra-1.1.0 /install.sh
Then I run 'service dahdi start' , 'depmod –a' , 'dahdi_genconf' , 'dahdi_cfg –vv' , 'dmesg' one by one, and dmesg gave the following information:
=============================
dahdi_transcode: Loaded.
INFO-xpp: revision Unknown MAX_XPDS=64 (8*8)
INFO-xpp: FEATURE: without BRISTUFF support
INFO-xpp: FEATURE: with PROTOCOL_DEBUG
INFO-xpp: FEATURE: with sync_tick() from DAHDI
INFO-xpp_usb: revision Unknown
usbcore: registered new driver xpp_usb
dahdi_echocan_mg2: Registered echo canceler 'MG2'
dahdi: Registered tone zone 0 (United States / North America)
Bluetooth: HIDP (Human Interface Emulation) ver 1.1
usbcore: deregistering driver xpp_usb
dahdi_transcode: Unloaded.
opvxg4xx: Powering down all spans...
done.
ACPI: PCI interrupt for device 0000:06:01.0 disabled
opvxg4xx: shutdown OpenVox G4XX GSM/CDMA cards.
opvxg4xx 0000:06:01.0: Driver unloaded.
dahdi: Telephony Interface Unloaded
dahdi: Telephony Interface Registered on major 196
dahdi: Version: 2.3.0.1
dahdi_transcode: Loaded.
INFO-xpp: revision Unknown MAX_XPDS=64 (8*8)
INFO-xpp: FEATURE: without BRISTUFF support
INFO-xpp: FEATURE: with PROTOCOL_DEBUG
INFO-xpp: FEATURE: with sync_tick() from DAHDI
INFO-xpp_usb: revision Unknown
usbcore: registered new driver xpp_usb
PCI: Enabling device 0000:06:01.0 (0000 -> 0002)
ACPI: PCI Interrupt 0000:06:01.0[A] -> GSI 22 (level, low) -> IRQ 74
Found an OpenVox G400P: Version 1.0
opvxg4xx: slot 0 is Installed
opvxg4xx: slot 1 is Installed
opvxg4xx: slot 2 is Empty
opvxg4xx: slot 3 is Empty
opvxg4xx: Powering up all spans...
dahdi_echocan_mg2: Registered echo canceler 'MG2'
dahdi: Registered tone zone 0 (United States / North America)
Unable to register Zaptel character device handler on 196
opvxg4xx: Powering down all spans...
done.
ACPI: PCI interrupt for device 0000:06:01.0 disabled
opvxg4xx: shutdown OpenVox G4XX GSM/CDMA cards.
opvxg4xx 0000:06:01.0: Driver unloaded.
Unable to register Zaptel character device handler on 196
Unable to register Zaptel character device handler on 196
dahdi_transcode: Unloaded.
usbcore: deregistering driver xpp_usb
dahdi: Telephony Interface Unloaded
Zapata Telephony Interface Registered on major 196
Zaptel Version: 1.4.12.1
Zaptel Echo Canceller: MG2
PCI: Enabling device 0000:06:01.0 (0000 -> 0002)
ACPI: PCI Interrupt 0000:06:01.0[A] -> GSI 22 (level, low) -> IRQ 74
Found an OpenVox G400P: Version 1.0
opvxg4xx: slot 0 is Installed
opvxg4xx: slot 1 is Installed
opvxg4xx: slot 2 is Empty
opvxg4xx: slot 3 is Empty
opvxg4xx: Powering up all spans...
Registered tone zone 0 (United States / North America)
opvxg4xx: Powering down all spans...
done.
ACPI: PCI interrupt for device 0000:06:01.0 disabled
opvxg4xx: shutdown OpenVox G4XX GSM/CDMA cards.
Zapata Telephony Interface Unloaded
dahdi: Telephony Interface Registered on major 196
dahdi: Version: 2.3.0.1
dahdi_transcode: Loaded.
INFO-xpp: revision Unknown MAX_XPDS=64 (8*8)
INFO-xpp: FEATURE: without BRISTUFF support
INFO-xpp: FEATURE: with PROTOCOL_DEBUG
INFO-xpp: FEATURE: with sync_tick() from DAHDI
INFO-xpp_usb: revision Unknown
usbcore: registered new driver xpp_usb
PCI: Enabling device 0000:06:01.0 (0000 -> 0002)
ACPI: PCI Interrupt 0000:06:01.0[A] -> GSI 22 (level, low) -> IRQ 74
Found an OpenVox G400P: Version 1.0
opvxg4xx: slot 0 is Installed
opvxg4xx: slot 1 is Installed
opvxg4xx: slot 2 is Empty
opvxg4xx: slot 3 is Empty
opvxg4xx: Powering up all spans...
dahdi_echocan_mg2: Registered echo canceler 'MG2'
dahdi: Registered tone zone 0 (United States / North America)
=============================
Then I run 'asterisk -c' and get a fatal error:
=============================
[Jun 16 11:39:34] NOTICE[6641]: cdr.c:1471 do_reload: CDR simple logging enabled.
[Jun 16 11:39:34] NOTICE[6641]: loader.c:1060 load_modules: 184 modules will be loaded.
[Jun 16 11:39:34] WARNING[6641]: loader.c:387 load_dynamic_module: Error loading module 'res_config_odbc.so': /usr/lib/asterisk/modules/res_config_odbc.so: undefined symbol: ast_odbc_clear_cache
.[Jun 16 11:39:35] NOTICE[6641]: res_smdi.c:1360 load_module: No SMDI interfaces are available to listen on, not starting SMDI listener.
.[Jun 16 11:39:35] WARNING[6641]: res_config_ldap.c:1591 parse_config: No directory user found, anonymous binding as default.
[Jun 16 11:39:35] ERROR[6641]: res_config_ldap.c:1616 parse_config: No directory URL or host found.
[Jun 16 11:39:35] NOTICE[6641]: res_config_ldap.c:1510 load_module: Cannot load LDAP RealTime driver.
..[Jun 16 11:39:35] NOTICE[6641]: res_odbc.c:1694 load_module: res_odbc loaded.
.....................................[Jun 16 11:39:35] WARNING[6641]: chan_dahdi.c:17138 process_dahdi: Ignoring any changes to 'userbase' (on reload) at line 23.
[Jun 16 11:39:35] WARNING[6641]: chan_dahdi.c:17138 process_dahdi: Ignoring any changes to 'vmsecret' (on reload) at line 31.
[Jun 16 11:39:35] WARNING[6641]: chan_dahdi.c:17138 process_dahdi: Ignoring any changes to 'hassip' (on reload) at line 35.
[Jun 16 11:39:35] WARNING[6641]: chan_dahdi.c:17138 process_dahdi: Ignoring any changes to 'hasiax' (on reload) at line 39.
[Jun 16 11:39:35] WARNING[6641]: chan_dahdi.c:17138 process_dahdi: Ignoring any changes to 'hasmanager' (on reload) at line 47.
.............[Jun 16 11:39:35] NOTICE[6641]: config.c:1961 ast_config_engine_register: Registered Config Engine curl
.......[Jun 16 11:39:35] NOTICE[6641]: pbx_ael.c:122 pbx_load_module: Starting AEL load process.
[Jun 16 11:39:35] NOTICE[6641]: pbx_ael.c:135 pbx_load_module: AEL load process: parsed config file name '/etc/asterisk/extensions.ael'.
[Jun 16 11:39:35] NOTICE[6641]: pbx_ael.c:138 pbx_load_module: AEL load process: checked config file name '/etc/asterisk/extensions.ael'.
[Jun 16 11:39:35] NOTICE[6641]: pbx_ael.c:145 pbx_load_module: AEL load process: compiled config file name '/etc/asterisk/extensions.ael'.
[Jun 16 11:39:35] NOTICE[6641]: pbx_ael.c:150 pbx_load_module: AEL load process: merged config file name '/etc/asterisk/extensions.ael'.
[Jun 16 11:39:35] NOTICE[6641]: pbx_ael.c:153 pbx_load_module: AEL load process: verified config file name '/etc/asterisk/extensions.ael'.
.........[Jun 16 11:39:35] NOTICE[6641]: cdr_radius.c:252 load_module: Cannot load radiusclient-ng configuration file /etc/radiusclient-ng/radiusclient.conf.
........[Jun 16 11:39:35] WARNING[6641]: utils.c:1536 __ast_string_field_init: trying to reset empty pool
[Jun 16 11:39:35] WARNING[6641]: utils.c:1536 __ast_string_field_init: trying to reset empty pool
[Jun 16 11:39:35] WARNING[6641]: utils.c:1536 __ast_string_field_init: trying to reset empty pool
............... == Aliased CLI command 'hangup request' to 'channel request hangup'
== Aliased CLI command 'originate' to 'channel originate'
== Aliased CLI command 'help' to 'core show help'
== Aliased CLI command 'pri intense debug span' to 'pri set debug 2 span'
== Aliased CLI command 'reload' to 'module reload'
......................[Jun 16 11:39:35] NOTICE[6641]: config.c:1961 ast_config_engine_register: Registered Config Engine odbc
......................................[Jun 16 11:39:35] NOTICE[6641]: chan_skinny.c:7066 config_load: Configuring skinny from skinny.conf
..............SIP channel loading...
.[Jun 16 11:39:35] WARNING[6641]: chan_extra.c:11756 process_extra: Ignoring any changes to 'userbase' (on reload) at line 23.
[Jun 16 11:39:35] WARNING[6641]: chan_extra.c:11756 process_extra: Ignoring any changes to 'vmsecret' (on reload) at line 31.
[Jun 16 11:39:35] WARNING[6641]: chan_extra.c:11756 process_extra: Ignoring any changes to 'hassip' (on reload) at line 35.
[Jun 16 11:39:35] WARNING[6641]: chan_extra.c:11756 process_extra: Ignoring any changes to 'hasiax' (on reload) at line 39.
[Jun 16 11:39:35] WARNING[6641]: chan_extra.c:11756 process_extra: Ignoring any changes to 'hasmanager' (on reload) at line 47.
.............. ]
Asterisk Ready.
*CLI> [Jun 16 11:39:37] ERROR[6675]: chan_extra.c:8568 extra_gsm_error: [simcom.c(471)-simcom_receive] !+CME ERROR: SIM not inserted!
=============================

What I can confirm is that the SIM is correctly inserted into G400P , because when I switch back to opvx-bristuff-0.4.0-RC3h it works fine. So it must be software problems. But I just followed the guidance in http://www.chan-extra.org/index.php/OpenVox_G400P_User_Manual_for_dahdi ,can you give some advices? Thank you very very much.

A student from Huazhong University of Science and Technology
12 years 10 months ago #6989 by Joe.Yung
Yes, the chan-extra would inform you SIM not inserted if you are not fully using all the modules.

From your post, I found that you only used two of them, right?. So, to disable the errors on the asterisk CLI, please forward to /etc/asterisk/extra-channels.conf, then disable the channels you are not using(Span3 and Span 4?).

Time to create page: 0.048 seconds
Powered by Kunena Forum